/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Sjakk;
import javax.swing.ImageIcon;
/**
 *
 * @author Jørn
 */
public class Dronning extends Brikke {
    public Dronning(String id, String farge, int posX, int posY, boolean startPos){
        super(id, farge, posX, posY, startPos);
        java.net.URL url;
        if(farge.equals("Hvit")){
            url = Bonde.class.getResource("/hDronning.png");
        } else {
            url = Bonde.class.getResource("/sDronning.png");
        }
        icon = new ImageIcon(url);
    }
    @Override public int[][] lovligeFlytt(){
        int x = getPosX();
        int y = getPosY();
        int [][] lovlige = {
            {x+1, y}, //Taarnflytt
            {x+2, y},
            {x+3, y},
            {x+4, y},
            {x+5, y},
            {x+6, y},
            {x+7, y},
            {x-1, y},
            {x-2, y},
            {x-3, y},
            {x-4, y},
            {x-5, y},
            {x-6, y},
            {x-7, y},
            {x, y+1},
            {x, y+2},
            {x, y+3},
            {x, y+4},
            {x, y+5},
            {x, y+6},
            {x, y+7},
            {x, y-1},
            {x, y-2},
            {x, y-3},
            {x, y-4},
            {x, y-5},
            {x, y-6},
            {x, y-7},
            {x+1, y+1}, //Loperflytt
            {x+2, y+2},
            {x+3, y+3},
            {x+4, y+4},
            {x+5, y+5},
            {x+6, y+6},
            {x+7, y+7},
            {x-1, y-1},
            {x-2, y-2},
            {x-3, y-3},
            {x-4, y-4},
            {x-5, y-5},
            {x-6, y-6},
            {x-7, y-7},
            {x-1, y+1},
            {x-2, y+2},
            {x-3, y+3},
            {x-4, y+4},
            {x-5, y+5},
            {x-6, y+6},
            {x-7, y+7},
            {x+1, y-1},
            {x+2, y-2},
            {x+3, y-3},
            {x+4, y-4},
            {x+5, y-5},
            {x+6, y-6},
            {x+7, y-7}
        };
        return lovlige;
    }
}
